package com.ruoyi.html.handle.controller;

import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.html.handle.domin.GameItemHandleIns;
import com.ruoyi.html.handle.service.IGameItemHandleInsService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 游戏物品解析添加
 *
 * @author : 小胖
 * @version : 1.0
 * @date : 2022/05/08  16:42
 **/
@RestController
@RequiredArgsConstructor
@RequestMapping("item")
public class GameItemHandleInsController extends BaseController
{
    private final IGameItemHandleInsService gameItemHandleInsService;
    /**
     * 批量解析添加游戏物品
     */
    @RequiresPermissions("game:item:add")
    @PostMapping("handle/ins")
    public AjaxResult ins(@RequestBody GameItemHandleIns gameItemHandleIns)
    {
        gameItemHandleInsService.handleIns(gameItemHandleIns);
        return AjaxResult.success();
    }
}
